# -*- coding: utf-8 -*-
# @Time: 2021/4/9 15:41
# @Author: moxinqian
# @Contact: tel 18382469064
# @File: demo-selenium-remoteDriver.py
# @DESC: 远程driver
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

host = 'http://www.baidu.com/'
with webdriver.Remote(
    command_executor="http://192.168.1.25:4444/wd/hub",
    desired_capabilities=DesiredCapabilities.FIREFOX,) as driver:
    driver.get(host)
    print(driver.title)